
module.exports = {
	get(apiUrl, yes, error) {
		wx.request({
			url: apiUrl,
			header: { 'Content-Type': 'application/json' },
			success: yes,
			fail: error
		})
	},
	post(apiUrl, params, yes, error) {
		wx.request({
			url: apiUrl,
			method:"POST",
			data: params,
			header: { 'Content-Type': 'application/x-www-form-urlencoded' },
			success: yes,
			fail: error
		})
	}
}